package org.springblade.app.feign;

import lombok.extern.slf4j.Slf4j;
import org.springblade.app.feign.entity.SubAppInfoEntity;
import org.springblade.app.feign.entity.SubAppMenuEntity;
import org.springblade.app.feign.vo.SubAppMenuVO;
import org.springblade.core.tool.api.R;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

/**
 * @author zhangyr
 * @version 1.0
 * @date 2022-10-28 15:00
 * @description
 */
@Slf4j
@Component
public class IIotAppClientFallback implements IIotAppClient{
	@Override
	public R<SubAppInfoEntity> save(SubAppInfoEntity appInfo) {
		log.error("远程新增物联网子应用失败！");
		return R.fail("操作失败！");
	}

	@Override
	public R removeByAppId(String appIds) {
		log.error("远程删除物联网子应用失败！");
		return R.fail("操作失败！");
	}

	@Override
	public R setAppManager(String appId, Long userId, Integer isManager) {
		log.error("远程设置物联网子应用管理员失败！");
		return R.fail("操作失败！");
	}

	@Override
	public R transferApp(Long userId, String appId) {
		log.error("远程转让物联网子应用失败！");
		return R.fail("操作失败！");
	}

	@Override
	public R addUser(String appId, Integer linkType, String userIds) {
		log.error("远程新增物联网子应用用户失败！");
		return R.fail("操作失败！");
	}

	@Override
	public R deleteUser(String userIds, Integer linkType, String appId) {
		log.error("远程删除物联网子应用用户失败！");
		return R.fail("操作失败！");
	}

	@Override
	public R update(SubAppInfoEntity appInfo) {
		log.error("远程修改物联网子应用失败！");
		return R.fail("操作失败！");
	}

	@Override
	public R updateByAppId(SubAppInfoEntity appInfo) {
		log.error("远程修改物联网子应用失败！");
		return R.fail("操作失败！");
	}

	@Override
	public R<List<SubAppMenuVO>> lazyListManageMenu(Long parentId, Map<String, Object> menu) {
		log.error("远程加载物联网子应用菜单失败！");
		return R.fail("操作失败！");
	}

	@Override
	public R<SubAppMenuVO> getById(Long id) {
		log.error("远程查看物联网子应用菜单失败！");
		return R.fail("操作失败！");
	}

	@Override
	public R submitMenu(SubAppMenuEntity menu) {
		log.error("远程新增或修改物联网子应用菜单失败！");
		return R.fail("操作失败！");
	}

	@Override
	public R removeMenu(String ids) {
		log.error("远程删除物联网子应用菜单失败！");
		return R.fail("操作失败！");
	}
}
